package alumninet.persistence.entities.user;

import java.security.Principal;

import javax.persistence.Basic;
import javax.persistence.Entity;

import alumninet.om.AccountType;
import alumninet.persistence.entities.BaseEntity;

@Entity
public class Account extends BaseEntity implements Principal {
	private String name;
	private String password; // only for local accounts
	private String scope;
	@Basic
	private AccountType type;
	@Basic
	private String token;

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String getName() {
		return this.name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getScope() {
		return scope;
	}

	public void setScope(String scope) {
		this.scope = scope;
	}

	public AccountType getType() {
		return type;
	}

	public void setType(AccountType type) {
		this.type = type;
	}

	public void setToken(String param) {
		this.token = param;
	}

	public String getToken() {
		return token;
	}

}
